﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="role_module.aspx.cs" Inherits="TCMSystem.admin.role_module" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style>
        .x-grid-tpl .others input
        {
            vertical-align: middle;
        }
        .x-grid-tpl .others label
        {
            margin-left: 2px;
            margin-right: 10px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <ext:PageManager ID="PageManager1" AutoSizePanelID="RegionPanel1" runat="server" />
    <ext:RegionPanel ID="RegionPanel1" ShowBorder="false" runat="server">
        <Regions>
            <ext:Region ID="Region1" ShowBorder="false" ShowHeader="false" Split="true" EnableSplitTip="true"
                CollapseMode="Mini" Margins="0 0 0 0" Width="200px" Position="Left" Layout="Fit"
                BodyPadding="5px 0 5px 5px" EnableBackgroundColor="true" runat="server">
                <Items>
                    <ext:Grid ID="Grid1" runat="server" ShowBorder="true" ShowHeader="false" EnableCheckBoxSelect="false"
                        EnableRowNumber="true" DataKeyNames="Id" AllowSorting="true" OnSort="Grid1_Sort"
                        SortColumnIndex="0" SortDirection="DESC" AllowPaging="false" EnableMultiSelect="false"
                        EnableRowClick="true" OnRowClick="Grid1_RowClick">
                        <Columns>
                            <ext:BoundField DataField="Name" SortField="Name" ExpandUnusedSpace="true" HeaderText="角色名称" />
                        </Columns>
                    </ext:Grid>
                </Items>
            </ext:Region>
            <ext:Region ID="Region2" ShowBorder="false" ShowHeader="false" Position="Center"
                Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Left" BodyPadding="5px 5px 5px 0"
                EnableBackgroundColor="true" runat="server">
                <Items>
                    <ext:Form ID="Form3" runat="server" Height="36px" BodyPadding="5px" ShowHeader="false"
                        ShowBorder="false" LabelAlign="Right" EnableBackgroundColor="true">
                        <Rows>
                            <ext:FormRow ID="FormRow2" runat="server">
                                <Items>
                                    <ext:TwinTriggerBox ID="ttbSearchUser" runat="server" ShowLabel="false" EmptyText="在模块标题中搜索"
                                        Trigger1Icon="Clear" Trigger2Icon="Search" ShowTrigger1="false" OnTrigger2Click="ttbSearchUser_Trigger2Click"
                                        OnTrigger1Click="ttbSearchUser_Trigger1Click">
                                    </ext:TwinTriggerBox>
                                    <ext:Label ID="Label1" runat="server">
                                    </ext:Label>
                                </Items>
                            </ext:FormRow>
                        </Rows>
                    </ext:Form>
                    <ext:Grid ID="Grid2" runat="server" BoxFlex="1" ShowBorder="true" ShowHeader="false"
                        EnableCheckBoxSelect="false" EnableRowNumber="true" DataKeyNames="ModuleId,Name" AllowSorting="true"
                        OnSort="Grid2_Sort" OnPreRowDataBound="Grid2_PreRowDataBound" OnRowDataBound="Grid2_RowDataBound"
                        SortColumnIndex="1" SortDirection="DESC" AllowPaging="false">
                        <Toolbars>
                            <ext:Toolbar ID="Toolbar1" runat="server">
                                <Items>
                                    <ext:Button ID="Button1" EnablePostBack="false" runat="server" Text="修改复选框的状态">
                                        <Menu ID="Menu1" runat="server">
                                            <ext:MenuButton ID="btnSelectCheckbox" EnablePostBack="false" runat="server" Text="全选复选框">
                                                <Menu runat="server">
                                                    <ext:MenuButton ID="mbtnSelectAllSelected" OnClick="btnSelectAll_Click" runat="server"
                                                        Text="选中的行">
                                                    </ext:MenuButton>
                                                    <ext:MenuButton ID="mbtnSelectAllCanRead" OnClick="btnSelectAll_Click" runat="server"
                                                        Text="浏览">
                                                    </ext:MenuButton>
                                                    <ext:MenuButton ID="mbtnSelectAllCanDelete" OnClick="btnSelectAll_Click" runat="server"
                                                        Text="删除">
                                                    </ext:MenuButton>
                                                    <ext:MenuButton ID="mbtnSelectAllCanEdit" OnClick="btnSelectAll_Click" runat="server"
                                                        Text="编辑">
                                                    </ext:MenuButton>
                                                    <ext:MenuButton ID="mbtnSelectAllCanAdd" OnClick="btnSelectAll_Click" runat="server"
                                                        Text="新增">
                                                    </ext:MenuButton>
                                                </Menu>
                                            </ext:MenuButton>
                                            <ext:MenuButton ID="btnUnselectCheckbox" EnablePostBack="false" runat="server" Text="反选复选框">
                                                <Menu ID="Menu2" runat="server">
                                                    <ext:MenuButton ID="mbtnUnSelectAllSelected" OnClick="btnUnSelectAll_Click" runat="server"
                                                        Text="选中的行">
                                                    </ext:MenuButton>
                                                    <ext:MenuButton ID="mbtnUnSelectAllCanRead" OnClick="btnUnSelectAll_Click" runat="server"
                                                        Text="浏览">
                                                    </ext:MenuButton>
                                                    <ext:MenuButton ID="mbtnUnSelectAllCanDelete" OnClick="btnUnSelectAll_Click" runat="server"
                                                        Text="删除">
                                                    </ext:MenuButton>
                                                    <ext:MenuButton ID="mbtnUnSelectAllCanEdit" OnClick="btnUnSelectAll_Click" runat="server"
                                                        Text="编辑">
                                                    </ext:MenuButton>
                                                    <ext:MenuButton ID="mbtnUnSelectAllCanAdd" OnClick="btnUnSelectAll_Click" runat="server"
                                                        Text="新增">
                                                    </ext:MenuButton>
                                                </Menu>
                                            </ext:MenuButton>
                                        </Menu>
                                    </ext:Button>
                                    <ext:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
                                    </ext:ToolbarSeparator>
                                    <ext:Button ID="btnGroupUpdate" Icon="GroupEdit" runat="server" Text="更新当前角色的模块权限"
                                        OnClick="btnGroupUpdate_Click">
                                    </ext:Button>
                                </Items>
                            </ext:Toolbar>
                        </Toolbars>
                        <Columns>
                            <ext:BoundField DataField="Title" SortField="Title" HeaderText="模块标题" Width="120px" />
                            <ext:BoundField DataField="Name" SortField="Name" HeaderText="模块名称" Width="120px" />
                            <ext:CheckBoxField TextAlign="Center" ColumnID="CanRead" DataField="CanRead" HeaderText="浏览"
                                RenderAsStaticField="false" Width="50px" />
                            <ext:CheckBoxField TextAlign="Center" ColumnID="CanDelete" DataField="CanDelete"
                                HeaderText="删除" RenderAsStaticField="false" Width="50px" />
                            <ext:CheckBoxField TextAlign="Center" ColumnID="CanEdit" DataField="CanEdit" HeaderText="编辑"
                                RenderAsStaticField="false" Width="50px" />
                            <ext:CheckBoxField TextAlign="Center" ColumnID="CanAdd" DataField="CanAdd" HeaderText="新增"
                                RenderAsStaticField="false" Width="50px" />
                            <ext:TemplateField ExpandUnusedSpace="true" ColumnID="Others" HeaderText="其他权限">
                                <ItemTemplate>
                                    <asp:CheckBoxList ID="ddlOthers" CssClass="others" RepeatLayout="Flow" RepeatDirection="Horizontal"
                                        runat="server">
                                    </asp:CheckBoxList>
                                </ItemTemplate>
                            </ext:TemplateField>
                        </Columns>
                    </ext:Grid>
                </Items>
            </ext:Region>
        </Regions>
    </ext:RegionPanel>
    </form>
</body>
</html>
